# Configurações do Apache para o projeto Empreendedor MEI

# Define a página padrão (index.php tem prioridade sobre index.html)
DirectoryIndex index.php index.html

# Habilita o mod_rewrite (se necessário no futuro)
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /empreendedormei/
    
    # Redireciona index.html para index.php
    RewriteRule ^index\.html$ index.php [R=301,L]
</IfModule>

# Configurações de segurança básicas
<IfModule mod_headers.c>
    # Previne clickjacking
    Header set X-Frame-Options "SAMEORIGIN"
    
    # Previne MIME type sniffing
    Header set X-Content-Type-Options "nosniff"
</IfModule>

# Configurações de PHP
<IfModule mod_php7.c>
    # Limite de upload (se necessário)
    php_value upload_max_filesize 10M
    php_value post_max_size 10M
    
    # Timezone
    php_value date.timezone "America/Sao_Paulo"
</IfModule>

# Bloqueia acesso a arquivos sensíveis
<FilesMatch "\.(htaccess|htpasswd|ini|log|sh|sql)$">
    Order Allow,Deny
    Deny from all
</FilesMatch>

# Permite acesso aos arquivos PHP e HTML
<FilesMatch "\.(php|html|js|css|png|jpg|jpeg|gif|webp|svg)$">
    Order Allow,Deny
    Allow from all
</FilesMatch>

